<template>
  <van-button
    :icon="value === 1 ? 'good-job' : 'good-job-o'"
    :class="'liked'：value === 1"
  />
</template>

<script>
export default {
  name: 'ThumbsUpArticle',
  props: {
    // 父组件传递服务器文章详情中的attitude
    value: {
      type: [Number, String],
      required: true
    },
    // 父组件传递当前文章ID
    carticleID: {
      type: [Number, String, Object],
      required: true
    }
  }
}
</script>

<style lang="less" scoped>
.liked {
  .van-icon {
    color: #e5645f;
  }
}
</style>
